Matthias Clasen [Wed, 17 Feb 2021 12:55:39 +0000 (12:55 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!3214
Matthias Clasen [Wed, 17 Feb 2021 04:48:48 +0000 (23:48 -0500)]
Revert "gizmo: Add a css_changed function"
This reverts commit
39f72b38341d2ff2d67c2043ce04915797d24fb8.
Matthias Clasen [Wed, 17 Feb 2021 04:48:30 +0000 (23:48 -0500)]
Revert "gizmo: Chain up in css_changed"
This reverts commit
bb0a1b0cfe74d74c97ba2711d1827843d21a2c81.
Matthias Clasen [Wed, 17 Feb 2021 04:47:20 +0000 (23:47 -0500)]
popover: Add a popover content class
Instead of bending GtkGizmo to the breaking point,
split off a GtkPopoverContent class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too.
Matthias Clasen [Wed, 17 Feb 2021 03:55:45 +0000 (03:55 +0000)]
Merge branch 'wip/smcv/reftest-dedup' into 'master'
Reduce duplication in reftests
See merge request GNOME/gtk!3203
Matthias Clasen [Wed, 17 Feb 2021 03:54:27 +0000 (03:54 +0000)]
Merge branch 'wip/jimmac/tiled-resize-area-gtk4' into 'master'
Adwaita: control surface for resize tiled windows
Closes #3670
See merge request GNOME/gtk!3211
Jakub Steiner [Tue, 16 Feb 2021 13:06:35 +0000 (14:06 +0100)]
Adwaita: control surface for resize tiled windows
- window resizing control area is implemented as where the shadows are drawn
- create a 'fake' shadow for the tiled case to allow easier resizing of
the tiled window ratio even if it's offset to the side of the border
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3670
Matthias Clasen [Tue, 16 Feb 2021 12:26:02 +0000 (12:26 +0000)]
Merge branch 'wip/jimmac/scrollbars-fine-tune-fix' into 'master'
Adwaita: avoid fine-tune scrollbars jumping
Closes #3672
See merge request GNOME/gtk!3208
Jakub Steiner [Mon, 15 Feb 2021 19:31:44 +0000 (20:31 +0100)]
Adwaita: Avoid fine-tune scrollbars jumping
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3672
Matthias Clasen [Tue, 16 Feb 2021 04:33:08 +0000 (04:33 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
wayland: Complete our buffer format listing
See merge request GNOME/gtk!3207
Matthias Clasen [Mon, 15 Feb 2021 21:43:47 +0000 (21:43 +0000)]
Merge branch 'fix-scrollbar-sizing' into 'master'
gizmo: Chain up in css_changed
See merge request GNOME/gtk!3206
Matthias Clasen [Mon, 15 Feb 2021 21:39:58 +0000 (16:39 -0500)]
wayland: Complete our buffer format listing
The debug spew for printing out supported buffer
formats was missing a bunch, among them the fp16
formats that are interesting for HDR support.
Add them.
Note that we still only support ARGB8888. But
at least we can print out what don't support.
Matthias Clasen [Mon, 15 Feb 2021 19:26:52 +0000 (14:26 -0500)]
gizmo: Chain up in css_changed
css_changed is a vfunc that *must* chain up.
Failure to do so broke the resizing of overlay scrollbars,
amongst other things.
This bug was introduced in
39f72b38341d2ff2d67.
Matthias Clasen [Mon, 15 Feb 2021 18:08:45 +0000 (18:08 +0000)]
Merge branch 'lenient-compose-parsing' into 'master'
imcontext: Be more lenient in parsing Compose
See merge request GNOME/gtk!3201
Matthias Clasen [Mon, 15 Feb 2021 18:06:00 +0000 (18:06 +0000)]
Merge branch 'wip/jimmac/larger-smaller-scrollbar-gtk4' into 'master'
Adwaita: Scrollbar transitions and size
Closes #1886
See merge request GNOME/gtk!3204
Jakub Steiner [Wed, 10 Feb 2021 11:37:45 +0000 (12:37 +0100)]
Adwaita: Scrollbar transitions and size
- tone down the size of the controller again
- transition between the indicator and control fluidly
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1886
Simon McVittie [Sat, 13 Feb 2021 18:21:25 +0000 (18:21 +0000)]
reftests: Share reftest-compare.[ch] between GSK and GTK tests
The only non-whitespace difference is that the copy in GSK does not
set the symbol's visibility.
Signed-off-by: Simon McVittie <smcv@debian.org>
Simon McVittie [Sat, 13 Feb 2021 18:25:18 +0000 (18:25 +0000)]
reftest-compare: Fix spelling of "diff"
This is the only non-whitespace difference between the copies in
testsuite/reftests/ and testsuite/gsk/.
Signed-off-by: Simon McVittie <smcv@debian.org>
Matthias Clasen [Mon, 15 Feb 2021 06:41:09 +0000 (01:41 -0500)]
imcontext: Improve compose table parsing
Avoid leaking value in error cases, and actually
emit a warning for a missing quote. Pointed out
by Peter Bloomfield.
Jordi Mas [Sun, 14 Feb 2021 20:52:55 +0000 (21:52 +0100)]
Update Catalan translation
Matthias Clasen [Sun, 14 Feb 2021 17:56:00 +0000 (12:56 -0500)]
imcontext: Be more lenient in parsing Compose
X11 allows keysyms to be specified in addition to strings.
We only support the strings. In the past, we ignored everything
after the string. Go back to doing that, but issue a warning
that we've ignored the keysym.
Matthias Clasen [Sun, 14 Feb 2021 17:25:58 +0000 (17:25 +0000)]
Merge branch 'fix-compose-comments' into 'master'
Fix compose comments
Closes #3664
See merge request GNOME/gtk!3199
Matthias Clasen [Sun, 14 Feb 2021 17:22:50 +0000 (17:22 +0000)]
Merge branch 'popup-shadow-width' into 'master'
Support shadows on popovers
See merge request GNOME/gtk!3089
Matthias Clasen [Sun, 14 Feb 2021 16:54:05 +0000 (11:54 -0500)]
imcontext: Fix a regression in Compose file parsing
We accidentally dropped the handing of # comments.
Bring it back. Test included.
Fixes: #3664
Matthias Clasen [Sun, 14 Feb 2021 16:53:49 +0000 (11:53 -0500)]
testsuite: Add a missing file
Matthias Clasen [Sun, 14 Feb 2021 16:22:44 +0000 (11:22 -0500)]
window: Add some more details to css docs
Mention more of the supported style classes.
Matthias Clasen [Sun, 14 Feb 2021 16:14:23 +0000 (11:14 -0500)]
Update popover css docs
Mention that shadows are now possible.
Matthias Clasen [Sun, 14 Feb 2021 15:59:29 +0000 (15:59 +0000)]
Merge branch 'antoniof-master-patch-32022' into 'master'
docs: Mark heading in migration guide
See merge request GNOME/gtk!3198
Matthias Clasen [Sun, 14 Feb 2021 02:12:40 +0000 (21:12 -0500)]
macos: Apply popup shadow width
Matthias Clasen [Sun, 14 Feb 2021 02:10:52 +0000 (21:10 -0500)]
win32: Apply popup shadow width
António Fernandes [Sun, 14 Feb 2021 15:20:54 +0000 (15:20 +0000)]
docs: Mark heading in migration guide
This heading was missing from the index because it was not marked as one
Matthias Clasen [Sun, 14 Feb 2021 02:10:10 +0000 (21:10 -0500)]
x11: Apply popup shadow with
Matthias Clasen [Sun, 14 Feb 2021 00:05:26 +0000 (19:05 -0500)]
popover: Handle shadow changes
When the box-shadow css property of the contents
widget changes, queue a resize on the popover.
Matthias Clasen [Sun, 14 Feb 2021 00:04:10 +0000 (19:04 -0500)]
gizmo: Add a css_changed function
In a break from the current gizmo api, add a separate
setter, since the calls with long argument lists full
of NULL are getting out of hand.
Matthias Clasen [Sat, 13 Feb 2021 20:46:00 +0000 (15:46 -0500)]
Add a test for popover positioning
This is useful for testing the interaction of arrows, shadows
or offsets with popover positioning.
Matthias Clasen [Mon, 1 Feb 2021 00:26:33 +0000 (19:26 -0500)]
popover: Support shadows
Use gdk_popup_layout_set_shadow_width to take shadows into
account when positioning popovers, and set the input region
to exclude the shadow, since we aren't doing interactive
resizing and the like.
When the popover has a beak, we make the surface size be
content size + shadow + tail, and then position the content
according to the final position inside this slightly too large
surface. The surface being too large doesn't matter, since we
set up an input region.
Matthias Clasen [Sun, 14 Feb 2021 01:48:15 +0000 (20:48 -0500)]
wayland: Set shadow width on popup surfaces
Take the shadow width from the popup layout into account.
Matthias Clasen [Sun, 14 Feb 2021 01:47:57 +0000 (20:47 -0500)]
popuplayout: Add shadow width
Add shadow width to the GdkPopupLayout struct. This
information is needed by the compositor to make correct
positioning decisions about popups.
Matthias Clasen [Sun, 14 Feb 2021 01:59:35 +0000 (01:59 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!3197
Matthias Clasen [Sun, 14 Feb 2021 01:25:24 +0000 (20:25 -0500)]
popover: Queue a resize when position changes
At least with an arrow, changing the position
requires a resize
Matthias Clasen [Sun, 14 Feb 2021 00:22:06 +0000 (19:22 -0500)]
popover: Cosmetics
Balázs Meskó [Sun, 14 Feb 2021 00:07:07 +0000 (00:07 +0000)]
Update Hungarian translation
Matthias Clasen [Fri, 12 Feb 2021 21:29:08 +0000 (21:29 +0000)]
Merge branch 'revert-
82ab039a' into 'master'
Revert "Merge branch 'disable-macos-ci' into 'master'"
See merge request GNOME/gtk!3192
Matthias Clasen [Fri, 12 Feb 2021 21:04:15 +0000 (16:04 -0500)]
Stop passing introspection=false to graphene
This should no longer be possible (and the introspection
option is no longer a boolean.
Matthias Clasen [Fri, 12 Feb 2021 20:24:27 +0000 (15:24 -0500)]
ci: Add debug spew on macos
Bartłomiej Piotrowski [Fri, 12 Feb 2021 19:40:57 +0000 (19:40 +0000)]
Revert "Merge branch 'disable-macos-ci' into 'master'"
This reverts merge request !3183
Matthias Clasen [Fri, 12 Feb 2021 14:07:07 +0000 (14:07 +0000)]
Merge branch 'win32.surface.resize' into 'master'
Some fixes for resizing of GDK/Win32 surfaces
See merge request GNOME/gtk!3144
Matthias Clasen [Fri, 12 Feb 2021 14:03:54 +0000 (14:03 +0000)]
Merge branch 'flatpak-tweaks' into 'master'
Flatpak tweaks
See merge request GNOME/gtk!3187
Matthias Clasen [Fri, 12 Feb 2021 13:46:14 +0000 (13:46 +0000)]
Merge branch 'ci-fedora-33' into 'master'
ci: Update the Fedora image to F33
See merge request GNOME/gtk!3188
Matthias Clasen [Fri, 12 Feb 2021 12:45:51 +0000 (12:45 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master
See merge request GNOME/gtk!3189
Timm Bäder [Sat, 30 Jan 2021 15:01:54 +0000 (16:01 +0100)]
nativedialog: Remove unused run state
Timm Bäder [Fri, 12 Feb 2021 07:36:21 +0000 (08:36 +0100)]
build: Check for mallinfo2 instead of mallinfo
Similar to https://github.com/llvm/llvm-project/commit/
e89fcbfad6a3edb203ebdc2b1ead275fe909281a
but the tests we use mallinfo() in really aren't important to not worth
the effort to differentiate between mallinfo and mallinfo2. Only check
for mallinfo2().
Matthias Clasen [Fri, 12 Feb 2021 05:26:10 +0000 (00:26 -0500)]
flatpak: Try harder to disable sassc
Matthias Clasen [Fri, 12 Feb 2021 05:10:30 +0000 (00:10 -0500)]
Add devel styling to nightly flatpaks
Pass -Dprofile=devel to the gtk build for our nightly
flatpaks, so they pick up devel styling.
Matthias Clasen [Fri, 12 Feb 2021 04:35:26 +0000 (23:35 -0500)]
demos: Add devel styling
Add a -Dprofile=devel meson option, and add some visual
hints to the demos that you are running a nightly build.
Matthias Clasen [Fri, 12 Feb 2021 04:00:19 +0000 (23:00 -0500)]
flatpak: No need to build sassc anymore
We should be able to do a gtk build without rebuilding
css nowadays.
Matthias Clasen [Fri, 12 Feb 2021 03:02:39 +0000 (22:02 -0500)]
ci: Update the Fedora image to F33
Matthias Clasen [Thu, 11 Feb 2021 19:41:10 +0000 (19:41 +0000)]
Merge branch 'fix-network-places' into 'master'
placesview: Avoid use-after-free
See merge request GNOME/gtk!3186
Matthias Clasen [Thu, 11 Feb 2021 17:04:47 +0000 (17:04 +0000)]
Merge branch 'wip/jimmac/tiled-shadow-fix-fix-gtk4' into 'master'
Adwaita: bring borders for tiled
Closes #3661
See merge request GNOME/gtk!3184
Matthias Clasen [Thu, 11 Feb 2021 17:02:00 +0000 (17:02 +0000)]
Merge branch 'ebassi/memdup2' into 'master'
Use g_memdup2()
See merge request GNOME/gtk!3157
Emmanuele Bassi [Thu, 4 Feb 2021 19:26:58 +0000 (19:26 +0000)]
tests: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Emmanuele Bassi [Thu, 4 Feb 2021 19:20:10 +0000 (19:20 +0000)]
Ensure we don't overflow when using g_memdup2()
When we turn integers into size_t we should check we're not going to
make a mess.
Emmanuele Bassi [Thu, 4 Feb 2021 19:18:54 +0000 (19:18 +0000)]
win32: Move from g_memdup() to g_memdup2()
Use `size_t` and `gsize` consistently for the length argument in every
function taking a bytes array and a length.
Emmanuele Bassi [Thu, 4 Feb 2021 19:18:28 +0000 (19:18 +0000)]
gtk: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Emmanuele Bassi [Thu, 4 Feb 2021 19:16:39 +0000 (19:16 +0000)]
gsk: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Emmanuele Bassi [Thu, 4 Feb 2021 19:16:02 +0000 (19:16 +0000)]
gdk: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Emmanuele Bassi [Thu, 4 Feb 2021 19:15:32 +0000 (19:15 +0000)]
x11: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Emmanuele Bassi [Thu, 4 Feb 2021 19:14:47 +0000 (19:14 +0000)]
wayland: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Emmanuele Bassi [Thu, 4 Feb 2021 19:13:36 +0000 (19:13 +0000)]
macos: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Emmanuele Bassi [Thu, 4 Feb 2021 19:09:56 +0000 (19:09 +0000)]
broadway: Move from g_memdup() to g_memdup2()
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
Jakub Steiner [Thu, 11 Feb 2021 14:16:57 +0000 (15:16 +0100)]
Adwaita: bring borders for tiled
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3661
Matthias Clasen [Thu, 11 Feb 2021 14:14:34 +0000 (09:14 -0500)]
placesview: Avoid use-after-free
The places view has questionable code for handling
'destroy', which seems to trigger use-after-free in
some cases. Clean this up a bit by acknowledging the
cancellation fully, rather than relying on the
destroyed flag.
Emmanuele Bassi [Thu, 4 Feb 2021 19:27:22 +0000 (19:27 +0000)]
Add compatibility shim for g_memdup2()
We don't necessarily want to depend on a newer version of GLib, given
that we're not really using g_memdup() in the wrong way.
Matthias Clasen [Thu, 11 Feb 2021 01:14:21 +0000 (01:14 +0000)]
Merge branch 'wip/chergert/inline-transform-category' into 'master'
gsk: move transform structure to private.h
See merge request GNOME/gtk!3182
Matthias Clasen [Thu, 11 Feb 2021 01:14:01 +0000 (01:14 +0000)]
Merge branch 'disable-macos-ci' into 'master'
ci: Temporarily disable macOS CI job as runner is offline
See merge request GNOME/gtk!3183
Matthias Clasen [Thu, 11 Feb 2021 00:51:40 +0000 (00:51 +0000)]
Merge branch 'fix-filter-value' into 'master'
css: Avoid an invalid read
See merge request GNOME/gtk!3181
Matthias Clasen [Thu, 11 Feb 2021 00:49:33 +0000 (19:49 -0500)]
ci: Temporarily disable macOS CI job as runner is offline
See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/495
Matthias Clasen [Thu, 11 Feb 2021 00:47:08 +0000 (00:47 +0000)]
Merge branch 'wip/chergert/fix-unused' into 'master'
snapshot: fix warning when asserts are disabled
See merge request GNOME/gtk!3180
Christian Hergert [Thu, 11 Feb 2021 00:04:20 +0000 (16:04 -0800)]
gsk: move transform structure to private.h
This allows using the category without having to call a function from the
hot paths of the renderer.
Christian Hergert [Thu, 11 Feb 2021 00:03:50 +0000 (16:03 -0800)]
snapshot: fix warning when asserts are disabled
Matthias Clasen [Thu, 11 Feb 2021 00:13:36 +0000 (19:13 -0500)]
css: Avoid an invalid read
This was broken in
ea7185bdb1ba423495340a9b880e619a861064fd.
Pointed out by Christian Hergert.
Matthias Clasen [Wed, 10 Feb 2021 13:55:50 +0000 (13:55 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!3177
Matthias Clasen [Wed, 10 Feb 2021 13:04:11 +0000 (08:04 -0500)]
iconbrowser: Use the right icon
We have an app icon, lets use it.
Matthias Clasen [Wed, 10 Feb 2021 12:52:29 +0000 (07:52 -0500)]
print-editor: Use the non-devel icon
We are no longer a nightly print editor.
Matthias Clasen [Wed, 10 Feb 2021 12:25:13 +0000 (07:25 -0500)]
node-editor: Use the non-devel icon
We're now a respectable, stable node editor.
Matthias Clasen [Wed, 10 Feb 2021 05:15:14 +0000 (05:15 +0000)]
Merge branch 'fix-clipped-texture' into 'master'
gl: Fixed clipped offscreen rendering
Closes #3651
See merge request GNOME/gtk!3175
Matthias Clasen [Wed, 10 Feb 2021 01:28:42 +0000 (20:28 -0500)]
gl: Fixed clipped offscreen rendering
When we are rendering a texture node to an offscreen,
and we have a clip, we must force the offscreen rendering.
Otherwise, the code will notice: Hey, it already is a texture
node, so no need to render it to a texture again. But when
clipping is involved, that is exactly what we want to do.
Testcase included.
Fixes: #3651
Matthias Clasen [Tue, 9 Feb 2021 23:16:49 +0000 (23:16 +0000)]
Merge branch 'wip/chergert/fix-maximized-shadows' into 'master'
adwaita: disable shadows when window is maximized or fullscreen
See merge request GNOME/gtk!3173
Jakub Steiner [Tue, 9 Feb 2021 17:57:31 +0000 (18:57 +0100)]
Adwaita: don't cast shadows for halt-tiled windows
- while the case of a single half tiled window casting shadow is valid,
the main use case for half tiled windows is when they have a neighbor.
The :backdrop should be enough of a focus indicator and we avoid shadow
casting on neighbors that are on the same Z level.
Christian Hergert [Thu, 4 Feb 2021 00:15:02 +0000 (16:15 -0800)]
adwaita: disable shadows when window is maximized or fullscreen
These shadows cause a significant draw performance drop for maximized
windows. Disabling them increases the chances we can have faster scroll
performance of text.
There is some risk here for systems where they have a dock and you expect
the shadow to draw beneath that dock for transparency reasons.
Matthias Clasen [Tue, 9 Feb 2021 12:27:35 +0000 (12:27 +0000)]
Merge branch 'win32-drop-formats-leak' into 'master'
win32: Fix some leaks
See merge request GNOME/gtk!3167
Matthias Clasen [Tue, 9 Feb 2021 12:11:49 +0000 (12:11 +0000)]
Merge branch 'wip/chergert/fix-bgr8-uploads' into 'master'
gl: handle B8G8R8 texture data when uploading
See merge request GNOME/gtk!3171
Christian Hergert [Mon, 8 Feb 2021 23:30:58 +0000 (15:30 -0800)]
gl: handle B8G8R8 texture data when uploading
We do not need to translate this on the CPU when we can instead push it
to the GPU in the same format and allow it to swizzle.
This fixes a huge number of memory allocations found while uploading the
GTK animation in widget-factory.
Matthias Clasen [Mon, 8 Feb 2021 20:30:27 +0000 (20:30 +0000)]
Merge branch 'wip/chergert/macos-perf-fixes' into 'master'
macos: various OpenGL performance fixes
See merge request GNOME/gtk!3170
Christian Hergert [Mon, 8 Feb 2021 17:59:59 +0000 (09:59 -0800)]
macos: improve use of swap rectangles with OpenGL
Christian Hergert [Mon, 8 Feb 2021 17:53:46 +0000 (09:53 -0800)]
macos: only flush when not attached
This makes it so we only flush the context for the NSView, not the context
that is the center of our center of the GL context spokes.
Christian Hergert [Mon, 8 Feb 2021 17:51:58 +0000 (09:51 -0800)]
macos: mark region as unlikely
Christian Hergert [Thu, 4 Feb 2021 04:53:23 +0000 (20:53 -0800)]
gsk: make gsk_render_node_get_node_type() use const
There isn't any state to modify in the type so we can use const here.
Doing so allows some of the renderer code to use const across a
number of functions so that repeated calls are elided if inlined.
Christian Hergert [Wed, 3 Feb 2021 23:00:28 +0000 (15:00 -0800)]
gsk: make render node getters pure
These do not do modify anything so they can be marked as pure to
potentially ellide calls. Since they do dereference, I do not believe
we can make them const although that is unclear since we could technically
just return a pointer + offset. Therefore it *might* be possible to also
make these G_GNUC_CONST.
Christian Hergert [Wed, 3 Feb 2021 22:49:42 +0000 (14:49 -0800)]
gsk: make render node getters const
This also removes the return if fail macros from these as a good portion
of them didn't have them anyway. I think it's fair to say that access to
these incorrectly is a programmer error.
It significantly reduces the amount of code generated into generally a
movss,ret.